import request from '@/utils/request'
export function create(data){
    return request({
        url: '/menu',
        method: 'post',
        data
    })
}

export function update(data){
    return request({
        url: '/menu',
        method: 'put',
        data
    })
}

export function del(id){
    return request({
        url: '/menu/'+id,
        method: 'delete'
    })
}

// 根据id或者对象
export function selectOne(id){
    return request({
        url: '/menu/'+id,
        method: 'get'
    })

}
export function page(query) {
    return request({
        url: '/menu/page',
        method: 'get',
        params: query
    })
}

export function menuTree() {
    return request({
        url: '/menu/menuTree',
        method: 'get'
    })
}